/**
 * build_project
 * <p>
 * Copyright 2014 cayden.cn, Inc. All rights reserved.
 *
 * @author Administrator
 * @date 2021-06-22 13:40
 */
package com.cayden.config.log.initializer;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import com.cayden.config.boot.Apps;
import com.cayden.config.log.LogbackConfigurator;

/**
 *
 * @author cayden
 * @date 2021-06-22 13:40
 */
public class FileInfoLogInitializer extends AbstractLogInitializer {

    @Override
    public void init(LogbackConfigurator configurator) {
        String fileName = Apps.getAppName() + "-info-30de.log";
        configurator.log("设置info级别的文件日志，日志文件为:%s", fileName);
        Appender<ILoggingEvent> appender =
                configurator.asyncFileAppender("FILE-INFO", configurator.getPattern(), fileName);
        configurator.root(Level.INFO, appender);
    }
}
